<!DOCTYPE html>
<html>
    <head>
        <meta charset='utf-8'>
        <title>iD</title>
          <link rel='stylesheet' href='iD.css'>
        <!-- mobile devices -->
        <meta name='viewport' content='initial-scale=1.0 maximum-scale=1.0'>
        <meta name='apple-mobile-web-app-capable' content='yes' />
        <meta name='apple-mobile-web-app-status-bar-style' content='black-translucent' />

        <script src='//d3nslu0hdya83q.cloudfront.net/dist/1.0/raven.min.js'></script>

        <script>
            Raven.config('https://af8ce79129b24fa28d91ede59302369c@app.getsentry.com/6009').install();
        </script>

        <!--[if !IE]>-->
        <script src='iD.js'></script>
        <!--<![endif]-->
    </head>
    <body>
        <div id='id-container'></div>
        <script>
            // google analytics
            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-38039653-2']);
            _gaq.push(['_trackPageview']);
            (function() {
              var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
              ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
              var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();

            // crazyegg
            setTimeout(function(){var a=document.createElement("script");
            var b=document.getElementsByTagName("script")[0];
            a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0013/6714.js?"+Math.floor(new Date().getTime()/3600000);
            a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);

            // Adding a canary for https://app.getsentry.com/id/id/group/5138888/
            if (Object.defineProperty) {
                var windowFocus = window.focus;
                Object.defineProperty(window, 'focus', {
                    get: function() {
                        return windowFocus;
                    },

                    set: function() {
                        try {
                            throw new Error("tried to overwrite window.focus");
                        } catch(e) {
                            Raven.captureException(e);
                        }
                    }
                });
            }

            if (typeof iD == 'undefined') {
                document.getElementById('id-container').innerHTML = 'This editor is supported ' +
                    'in Firefox, Chrome, Safari, Opera, and Internet Explorer 9 and above. ' +
                    'Please upgrade your browser or use Potlatch 2 to edit the map.';
                document.getElementById('id-container').className = 'unsupported';
            } else {
                var id = iD();
                d3.select('#id-container')
                    .call(id.ui());
            }
        </script>
    </body>
</html>
